﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using LGE;

namespace MagicFight
{
    public class BlockAura : Effect
    {
        public double timer = 500;
        Character caster;
        Texture2D sprite;

        public BlockAura(Character caster)
            : base(caster.position)
        {
            this.caster = caster;
            sprite = Engine.Load<Texture2D>("Images\\Magic\\Block");
        }

        public override void Update(GameTime gameTime)
        {
            position = caster.position;
            timer -= gameTime.ElapsedGameTime.TotalMilliseconds;
            if (timer < 0) Die();
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(sprite, position - new Vector2(sprite.Width / 2, sprite.Height / 2), Color.White);  //          desenhar glow vermelho em Map.GetCentralPos(MousePos)
        }
    }
}

 

